<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <button id="but" >fdsafd</button>
    <script>

        // 事件： 事件本身、事件源、事件处理
        function haha(a,b,c,d){
            debugger;
        }
        
        var but = document.getElementById('but');
//        but.onclick = haha;
        but.onkeydown = haha;
    </script>
</body>

</html>